package com.example.basemvvmkotlin

import android.app.Application
import com.example.basemvvmkotlin.net.MyApiClient
import com.example.basemvvmkotlin.net.UserApiService
import com.hjq.toast.ToastUtils


class APP : Application() {

    companion object {
        @Volatile
        private var instance: APP? = null

        @JvmStatic
        fun getInstance() =
            instance ?: synchronized(this) {
                instance ?: APP().also { instance = it }
            }
    }

    var build = "112431241"

    override fun onCreate() {
        super.onCreate()
        //提示框初始化
        ToastUtils.init(this)

        MyApiClient.getInstance().getService(UserApiService::class.java)

    }

}